/**
 * @name: Home
 * @Description:
 * @Author: 方琦
 * @Date: 2022/8/10 16:27
 **/
import React, { useState} from 'react';
import {inject, observer} from 'mobx-react';
import MenuList from '../components/home/MenuList';
import Footer from '../components/home/Footer';
import LoginUserMessage from "../components/home/LoginUserMessage";
import home from './home.module.css';
import desktopMenu from '../components/home/desktopMenu.module.css';

function Home(props) {
    
    
    const [data, setData] = useState(props.userStore.userInfo.data[2].permission_information)
    return (
        <div className={home.container}>
            <div className={desktopMenu.menu}>
                {data && data.map((item, index) => {
                    return <MenuList menuType={1} item={item} index={index} key={item.id}/>;
                })}
            </div>
            <LoginUserMessage/>
            <Footer/>
        </div>
    );
}

export default inject('userStore')(observer(Home));
